<?php
error_reporting(E_ALL ^ E_NOTICE);

set_time_limit(0);
/*ini_set("memory_limit", "200M");
  mysql_connect("host=localhost dbname=comzs  user=root  password=root")
   or die('Could not connect:'.mysql_last_error());
*/
$db_name="comzs";  
 
$table_name="comzs";  
 
$connection= @mysql_connect("localhost","root","root") or die(mysql_error());  
 
$db= @mysql_select_db($db_name,$connection) or die (mysql_error());  
//$stime =  date("Y-m-d",strtotime("-61 day"));
//$etime =  date("Y-m-d",strtotime("-1 day"));
 
$logdate =  mysql_query("SELECT DISTINCT dataTime FROM `comzs` where dataTime BETWEEN '2012-09-05' AND '2012-09-20'");

while($everylogdate = mysql_fetch_array($logdate))
{

    //cashSpendWeapons
    $cashSpendWeapons_query = mysql_query("SELECT sum(cashSpendWeapons)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $cashSpendWeapons = mysql_fetch_array($cashSpendWeapons_query);

    //AVGcashSpendWeapons
    $AVGcashSpendWeapons_query = mysql_query("SELECT avg(cashSpendWeapons)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $AVGcashSpendWeapons = mysql_fetch_array($AVGcashSpendWeapons_query);

    //cashSpendBullets
    $cashSpendBullets_query = mysql_query("SELECT sum(cashSpendBullets)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $cashSpendBullets = mysql_fetch_array($cashSpendBullets_query);

    //AVGcashSpendBullets
    $AVGcashSpendBullets_query = mysql_query("SELECT avg(cashSpendBullets)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $AVGcashSpendBullets = mysql_fetch_array($AVGcashSpendBullets_query);

    //cashLoot
    $cashLoot_query = mysql_query("SELECT sum(cashLoot)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $cashLoot = mysql_fetch_array($cashLoot_query);

    //DayUsedMoney
    $DayUsedMoney_query = mysql_query("SELECT sum(cashSpendWeapons+cashSpendBullets)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $DayUsedMoney = mysql_fetch_array($DayUsedMoney_query);

    //cashCurrent
    $cashCurrent_query = mysql_query("SELECT sum(cashCurrent)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $cashCurrent = mysql_fetch_array($cashCurrent_query);

    //weaponUseData_XM_1014
    $weaponUseData_XM_1014_query = mysql_query("SELECT sum(weaponUseData_XM_1014)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_XM_1014 = mysql_fetch_array($weaponUseData_XM_1014_query);

    //weaponUseData_Winchester_1200
    $weaponUseData_Winchester_1200_query = mysql_query("SELECT sum(weaponUseData_Winchester_1200)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_Winchester_1200 = mysql_fetch_array($weaponUseData_Winchester_1200_query);

    //weaponUseData_RPG_7
    $weaponUseData_RPG_7_query = mysql_query("SELECT sum(weaponUseData_RPG_7)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_RPG_7 = mysql_fetch_array($weaponUseData_RPG_7_query);

    //weaponUseData_Remington_870
    $weaponUseData_Remington_870_query = mysql_query("SELECT sum(weaponUseData_Remington_870)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_Remington_870 = mysql_fetch_array($weaponUseData_Remington_870_query);

    //weaponUseData_PGM
    $weaponUseData_PGM_query = mysql_query("SELECT sum(weaponUseData_PGM)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_PGM = mysql_fetch_array($weaponUseData_PGM_query);

    //weaponUseData_P90
    $weaponUseData_P90_query = mysql_query("SELECT sum(weaponUseData_P90)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_P90 = mysql_fetch_array($weaponUseData_P90_query);

    //weaponUseData_MP5
    $weaponUseData_MP5_query = mysql_query("SELECT sum(weaponUseData_MP5)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_MP5 = mysql_fetch_array($weaponUseData_MP5_query);

    //weaponUseData_M4
    $weaponUseData_M4_query = mysql_query("SELECT sum(weaponUseData_M4)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_M4 = mysql_fetch_array($weaponUseData_M4_query);

    //weaponUseData_M32
    $weaponUseData_M32_query = mysql_query("SELECT sum(weaponUseData_M32)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_M32 = mysql_fetch_array($weaponUseData_M32_query);

    //weaponUseData_LightSword
    $weaponUseData_LightSword_query = mysql_query("SELECT sum(weaponUseData_LightSword)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_LightSword = mysql_fetch_array($weaponUseData_LightSword_query);

    //weaponUseData_Laser
    $weaponUseData_Laser_query = mysql_query("SELECT sum(weaponUseData_Laser)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_Laser = mysql_fetch_array($weaponUseData_Laser_query);

    //weaponUseData_M32
    //$weaponUseData_M32_query = mysql_query("SELECT sum(weaponUseData_M32)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    //$weaponUseData_M32 = mysql_fetch_array($weaponUseData_PGM_query);

    //weaponUseData_HellFire
    $weaponUseData_HellFire_query = mysql_query("SELECT sum(weaponUseData_HellFire)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_HellFire = mysql_fetch_array($weaponUseData_HellFire_query);

    //weaponUseData_Gatling
    $weaponUseData_Gatling_query = mysql_query("SELECT sum(weaponUseData_Gatling)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_Gatling = mysql_fetch_array($weaponUseData_Gatling_query);

    //weaponUseData_Chainsaw
    $weaponUseData_Chainsaw_query = mysql_query("SELECT sum(weaponUseData_Chainsaw)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_Chainsaw = mysql_fetch_array($weaponUseData_Chainsaw_query);

    //weaponUseData_AUG
    $weaponUseData_AUG_query = mysql_query("SELECT sum(weaponUseData_AUG)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_AUG = mysql_fetch_array($weaponUseData_AUG_query);

    //weaponUseData_AK_47
    $weaponUseData_AK_47_query = mysql_query("SELECT sum(weaponUseData_AK_47)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUseData_AK_47 = mysql_fetch_array($weaponUseData_AK_47_query);

    //avatarUseData_Worker
    $avatarUseData_Worker_query = mysql_query("SELECT sum(avatarUseData_Worker)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Worker = mysql_fetch_array($avatarUseData_Worker_query);

    //avatarUseData_Swat
    $avatarUseData_Swat_query = mysql_query("SELECT sum(avatarUseData_Swat)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Swat = mysql_fetch_array($avatarUseData_Swat_query);

    //avatarUseData_Pirate
    $avatarUseData_Pirate_query = mysql_query("SELECT sum(avatarUseData_Pirate)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Pirate = mysql_fetch_array($avatarUseData_Pirate_query);

    //avatarUseData_Nerd
    $avatarUseData_Nerd_query = mysql_query("SELECT sum(avatarUseData_Nerd)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Nerd = mysql_fetch_array($avatarUseData_Nerd_query);

    //avatarUseData_Pastor
    $avatarUseData_Pastor_query = mysql_query("SELECT sum(avatarUseData_Pastor)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Pastor = mysql_fetch_array($avatarUseData_Pastor_query);

    //avatarUseData_Ninja
    $avatarUseData_Ninja_query = mysql_query("SELECT sum(avatarUseData_Ninja)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Ninja = mysql_fetch_array($avatarUseData_Ninja_query);

    //avatarUseData_Marine
    $avatarUseData_Marine_query = mysql_query("SELECT sum(avatarUseData_Marine)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Marine = mysql_fetch_array($avatarUseData_Marine_query);

    //avatarUseData_Human
    $avatarUseData_Human_query = mysql_query("SELECT sum(avatarUseData_Human)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Human = mysql_fetch_array($avatarUseData_Human_query);

    //avatarUseData_Eskimo
    $avatarUseData_Eskimo_query = mysql_query("SELECT sum(avatarUseData_Eskimo)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Eskimo = mysql_fetch_array($avatarUseData_Eskimo_query);

    //avatarUseData_EnegyArmor
    $avatarUseData_EnegyArmor_query = mysql_query("SELECT sum(avatarUseData_EnegyArmor)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_EnegyArmor = mysql_fetch_array($avatarUseData_EnegyArmor_query);

    //avatarUseData_Doctor
    $avatarUseData_Doctor_query = mysql_query("SELECT sum(avatarUseData_Doctor)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Doctor = mysql_fetch_array($avatarUseData_Doctor_query);

    //avatarUseData_Cowboy
    $avatarUseData_Cowboy_query = mysql_query("SELECT sum(avatarUseData_Cowboy)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Cowboy = mysql_fetch_array($avatarUseData_Cowboy_query);

    //avatarUseData_Pirate
    $avatarUseData_Pirate_query = mysql_query("SELECT sum(avatarUseData_Pirate)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $avatarUseData_Pirate = mysql_fetch_array($avatarUseData_Pirate_query);

    //bulletsBuy_Remington_870_BuyBullet
    $bulletsBuy_Remington_870_BuyBullet_query = mysql_query("SELECT sum(bulletsBuy_Remington_870_BuyBullet)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $bulletsBuy_Remington_870_BuyBullet = mysql_fetch_array($bulletsBuy_Remington_870_BuyBullet_query);

    //bulletsBuy_M4_BuyBullet
    $bulletsBuy_M4_BuyBullet_query = mysql_query("SELECT sum(bulletsBuy_M4_BuyBullet)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $bulletsBuy_M4_BuyBullet = mysql_fetch_array($bulletsBuy_M4_BuyBullet_query);

    //bulletsBuy_AUG_BuyBullet
    $bulletsBuy_AUG_BuyBullet_query = mysql_query("SELECT sum(bulletsBuy_AUG_BuyBullet)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $bulletsBuy_AUG_BuyBullet = mysql_fetch_array($bulletsBuy_AUG_BuyBullet_query);

    //bulletsBuy_AK_47_BuyBullet
    $bulletsBuy_AK_47_BuyBullet_query = mysql_query("SELECT sum(bulletsBuy_AK_47_BuyBullet)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $bulletsBuy_AK_47_BuyBullet = mysql_fetch_array($bulletsBuy_AK_47_BuyBullet_query);

    //bulletsBuy_MP5_BuyBullet
    $bulletsBuy_MP5_BuyBullet_query = mysql_query("SELECT sum(bulletsBuy_MP5_BuyBullet)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $bulletsBuy_MP5_BuyBullet = mysql_fetch_array($bulletsBuy_MP5_BuyBullet_query);

    //weaponUp_M4_Frequency
    $weaponUp_M4_Frequency_query = mysql_query("SELECT sum(weaponUp_M4_Frequency)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUp_M4_Frequency = mysql_fetch_array($weaponUp_M4_Frequency_query);

    //weaponUp_M4_Accuracy
    $weaponUp_M4_Accuracy_query = mysql_query("SELECT sum(weaponUp_M4_Accuracy)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUp_M4_Accuracy = mysql_fetch_array($weaponUp_M4_Accuracy_query);
    //weaponUp_M4_Power
    $weaponUp_M4_Power_query = mysql_query("SELECT sum(weaponUp_M4_Power)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUp_M4_Power = mysql_fetch_array($weaponUp_M4_Power_query);

    //weaponUp_AUG_Frequency
    $weaponUp_AUG_Frequency_query = mysql_query("SELECT sum(weaponUp_AUG_Frequency)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUp_AUG_Frequency = mysql_fetch_array($weaponUp_AUG_Frequency_query);

    //weaponUp_AUG_Accuracy
    $weaponUp_AUG_Accuracy_query = mysql_query("SELECT sum(weaponUp_AUG_Accuracy)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $weaponUp_AUG_Accuracy = mysql_fetch_array($weaponUp_AUG_Accuracy_query);

    //bulletsBuy_Winchester_1200_BuyBullet
    $bulletsBuy_Winchester_1200_BuyBullet_query = mysql_query("SELECT sum(bulletsBuy_Winchester_1200_BuyBullet)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0'");
    $bulletsBuy_Winchester_1200_BuyBullet = mysql_fetch_array($bulletsBuy_Winchester_1200_BuyBullet_query);

    //Buy_Avata_Cowboy
    $Buy_Avata_Cowboy_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Cowboy'");
    $Buy_Avata_Cowboy = mysql_fetch_array($Buy_Avata_Cowboy_query);

    //Buy_Avata_Doctor
    $Buy_Avata_Doctor_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Doctor'");
    $Buy_Avata_Doctor = mysql_fetch_array($Buy_Avata_Doctor_query);

    //Buy_Avata_EnegyArmor
    $Buy_Avata_EnegyArmor_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_EnegyArmor'");
    $Buy_Avata_EnegyArmor = mysql_fetch_array($Buy_Avata_EnegyArmor_query);

    //Buy_Avata_Eskimo
    $Buy_Avata_Eskimo_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Eskimo'");
    $Buy_Avata_Eskimo = mysql_fetch_array($Buy_Avata_Eskimo_query);

    //Buy_Avata_Marine
    $Buy_Avata_Marine_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Marine'");
    $Buy_Avata_Marine = mysql_fetch_array($Buy_Avata_Marine_query);

    //Buy_Avata_Nerd
    $Buy_Avata_Nerd_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Nerd'");
    $Buy_Avata_Nerd = mysql_fetch_array($Buy_Avata_Nerd_query);

    //Buy_Avata_Ninja
    $Buy_Avata_Ninja_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Ninja'");
    $Buy_Avata_Ninja = mysql_fetch_array($Buy_Avata_Ninja_query);

    //Buy_Avata_Pastor
    $Buy_Avata_Pastor_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Cowboy'");
    $Buy_Avata_Pastor = mysql_fetch_array($Buy_Avata_Pastor_query);

    //Buy_Avata_Pirate
    $Buy_Avata_Pirate_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Pirate'");
    $Buy_Avata_Pirate = mysql_fetch_array($Buy_Avata_Pirate_query);

    //Buy_Avata_Swat
    $Buy_Avata_Swat_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Swat'");
    $Buy_Avata_Swat = mysql_fetch_array($Buy_Avata_Swat_query);

   //Buy_Avata_Worker
    $Buy_Avata_Worker_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Avata_Worker'");
    $Buy_Avata_Worker = mysql_fetch_array($Buy_Avata_Worker_query);

    //Buy_Weapon_AK_47
    $Buy_Weapon_AK_47_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_AK-47'");
    $Buy_Weapon_AK_47 = mysql_fetch_array($Buy_Weapon_AK_47_query);

    //Buy_Weapon_AUG
    $Buy_Weapon_AUG_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_AUG'");
    $Buy_Weapon_AUG = mysql_fetch_array($Buy_Weapon_AUG_query);

    //Buy_Weapon_ElectricGun
    $Buy_Weapon_ElectricGun_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_ElectricGun'");
    $Buy_Weapon_ElectricGun = mysql_fetch_array($Buy_Weapon_ElectricGun_query);

    //Buy_Weapon_Gatling
    $Buy_Weapon_Gatling_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_Gatling'");
    $Buy_Weapon_Gatling = mysql_fetch_array($Buy_Weapon_Gatling_query);

    //Buy_Weapon_HellFire
    $Buy_Weapon_HellFire_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_HellFire'");
    $Buy_Weapon_HellFire = mysql_fetch_array($Buy_Weapon_HellFire_query);

    //Buy_Weapon_Laser
    $Buy_Weapon_Laser_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_Laser'");
    $Buy_Weapon_Laser = mysql_fetch_array($Buy_Weapon_Laser_query);

    //Buy_Weapon_M32
    $Buy_Weapon_M32_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_M32'");
    $Buy_Weapon_M32 = mysql_fetch_array($Buy_Weapon_M32_query);

    //Buy_Weapon_M4
    $Buy_Weapon_M4_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_M4'");
    $Buy_Weapon_M4 = mysql_fetch_array($Buy_Weapon_M4_query);

    //Buy_Weapon_P90
    $Buy_Weapon_P90_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_P90'");
    $Buy_Weapon_P90 = mysql_fetch_array($Buy_Weapon_P90_query);

    //Buy_Weapon_PGM
    $Buy_Weapon_PGM_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_PGM'");
    $Buy_Weapon_PGM = mysql_fetch_array($Buy_Weapon_PGM_query);

    //Buy_Weapon_RPG-7
    $Buy_Weapon_RPG_7_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_RPG-7'");
    $Buy_Weapon_RPG_7 = mysql_fetch_array($Buy_Weapon_RPG_7_query);

    //Buy_Weapon_Winchester
    $Buy_Weapon_Winchester_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_Winchester'");
    $Buy_Weapon_Winchester = mysql_fetch_array($Buy_Weapon_Winchester_query);

    //Buy_Weapon_XM-1014
    $Buy_Weapon_XM_1014_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_XM-1014'");
    $Buy_Weapon_XM_1014 = mysql_fetch_array($Buy_Weapon_XM_1014_query);

    //Buy_Weapon_Winchester_1200
    $Buy_Weapon_Winchester_1200_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_Winchester-1200'");
    $Buy_Weapon_Winchester_1200 = mysql_fetch_array($Buy_Weapon_Winchester_1200_query);

    //Buy_Weapon_LightSword
    $Buy_Weapon_LightSword_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_LightSword'");
    $Buy_Weapon_LightSword = mysql_fetch_array($Buy_Weapon_LightSword_query);

    //Buy_Weapon_Remington_870
    $Buy_Weapon_Remington_870_query = mysql_query("SELECT count(1)  FROM  comzs  where  dataTime ='$everylogdate[dataTime]' and  isJailbreak = '0' and consumeContent0 ='Buy_Weapon_Remington-870'");
    $Buy_Weapon_Remington_870 = mysql_fetch_array($Buy_Weapon_Remington_870_query);
        


   
 $sql="REPLACE INTO report_0927 (logdate,cashSpendWeapons,AVGcashSpendWeapons,cashSpendBullets,AVGcashSpendBullets,
    cashLoot,DayUsedMoney,cashCurrent,weaponUseData_XM_1014,weaponUseData_Winchester_1200,weaponUseData_RPG_7,
    weaponUseData_Remington_870,weaponUseData_PGM,weaponUseData_P90,
        weaponUseData_MP5,
        weaponUseData_M4,
        weaponUseData_M32,
        weaponUseData_LightSword,
        weaponUseData_Laser,
        weaponUseData_HellFire,
        weaponUseData_Gatling,
        weaponUseData_Chainsaw,
        weaponUseData_AUG,
        weaponUseData_AK_47,
        avatarUseData_Worker,
        avatarUseData_Swat,
        avatarUseData_Pirate,
        avatarUseData_Nerd,
        avatarUseData_Pastor,
        avatarUseData_Ninja,
        avatarUseData_Marine,
        avatarUseData_Human,
        avatarUseData_Eskimo,
        avatarUseData_EnegyArmor,
        avatarUseData_Doctor,
        avatarUseData_Cowboy,
        bulletsBuy_Winchester_1200_BuyBullet,
        bulletsBuy_Remington_870_BuyBullet,
        bulletsBuy_M4_BuyBullet,
        bulletsBuy_AUG_BuyBullet,
        bulletsBuy_AK_47_BuyBullet,
        bulletsBuy_MP5_BuyBullet,
        weaponUp_M4_Frequency,
        weaponUp_M4_Accuracy,
        weaponUp_M4_Power,
        weaponUp_AUG_Frequency,
        weaponUp_AUG_Accuracy,
        Buy_Avata_Cowboy,
        Buy_Avata_Doctor,
        Buy_Avata_EnegyArmor,
        Buy_Avata_Eskimo,
        Buy_Avata_Marine,
        Buy_Avata_Nerd,
        Buy_Avata_Ninja,
        Buy_Avata_Pastor,
        Buy_Avata_Pirate,
        Buy_Avata_Swat,
        Buy_Avata_Worker,
        Buy_Weapon_AK_47,
        Buy_Weapon_AUG,
        Buy_Weapon_ElectricGun,
        Buy_Weapon_Gatling,
        Buy_Weapon_HellFire,
        Buy_Weapon_Laser,
        Buy_Weapon_M32,
        Buy_Weapon_M4,
        Buy_Weapon_P90,
        Buy_Weapon_PGM,
        Buy_Weapon_RPG_7,
        Buy_Weapon_Winchester_1200,
        Buy_Weapon_XM_1014,
        Buy_Weapon_LightSword,
        Buy_Weapon_Remington_870) 
                  VALUES('$everylogdate[dataTime]','$cashSpendWeapons[0]','$AVGcashSpendWeapons[0]','$cashSpendBullets[0]','$AVGcashSpendBullets[0]',
                    '$cashLoot[0]','$DayUsedMoney[0]','$cashCurrent[0]','$weaponUseData_XM_1014[0]','$weaponUseData_Winchester_1200[0]','$weaponUseData_RPG_7[0]',
                    '$weaponUseData_Remington_870[0]','$weaponUseData_PGM[0]','$weaponUseData_P90[0]',
                    '$weaponUseData_MP5[0]',
                    '$weaponUseData_M4[0]',
                    '$weaponUseData_M32[0]',
                    '$weaponUseData_LightSword[0]',
                    '$weaponUseData_Laser[0]',
                    '$weaponUseData_HellFire[0]',
                    '$weaponUseData_Gatling[0]',
                    '$weaponUseData_Chainsaw[0]',
                    '$weaponUseData_AUG[0]',
                    '$weaponUseData_AK_47[0]',
                    '$avatarUseData_Worker[0]',
                    '$avatarUseData_Swat[0]',
                    '$avatarUseData_Pirate[0]',
                    '$avatarUseData_Nerd[0]',
                    '$avatarUseData_Pastor[0]',
                    '$avatarUseData_Ninja[0]',
                    '$avatarUseData_Marine[0]',
                    '$avatarUseData_Human[0]',
                    '$avatarUseData_Eskimo[0]',
                    '$avatarUseData_EnegyArmor[0]',
                    '$avatarUseData_Doctor[0]',
                    '$avatarUseData_Cowboy[0]',
                    '$bulletsBuy_Winchester_1200_BuyBullet[0]',
                    '$bulletsBuy_Remington_870_BuyBullet[0]',
                    '$bulletsBuy_M4_BuyBullet[0]',
                    '$bulletsBuy_AUG_BuyBullet[0]',
                    '$bulletsBuy_AK_47_BuyBullet[0]',
                    '$bulletsBuy_MP5_BuyBullet[0]',
                    '$weaponUp_M4_Frequency[0]',
                    '$weaponUp_M4_Accuracy[0]',
                    '$weaponUp_M4_Power[0]',
                    '$weaponUp_AUG_Frequency[0]',
                    '$weaponUp_AUG_Accuracy[0]',
                    '$Buy_Avata_Cowboy[0]',
                    '$Buy_Avata_Doctor[0]',
                    '$Buy_Avata_EnegyArmor[0]',
                    '$Buy_Avata_Eskimo[0]',
                    '$Buy_Avata_Marine[0]',
                    '$Buy_Avata_Nerd[0]',
                    '$Buy_Avata_Ninja[0]',
                    '$Buy_Avata_Pastor[0]',
                    '$Buy_Avata_Pirate[0]',
                    '$Buy_Avata_Swat[0]',
                    '$Buy_Avata_Worker[0]',
                    '$Buy_Weapon_AK_47[0]',
                    '$Buy_Weapon_AUG[0]',
                    '$Buy_Weapon_ElectricGun[0]',
                    '$Buy_Weapon_Gatling[0]',
                    '$Buy_Weapon_HellFire[0]',
                    '$Buy_Weapon_Laser[0]',
                    '$Buy_Weapon_M32[0]',
                    '$Buy_Weapon_M4[0]',
                    '$Buy_Weapon_P90[0]',
                    '$Buy_Weapon_PGM[0]',
                    '$Buy_Weapon_RPG_7[0]',
                    '$Buy_Weapon_Winchester_1200[0]',
                    '$Buy_Weapon_XM_1014[0]',
                    '$Buy_Weapon_LightSword[0]',
                    '$Buy_Weapon_Remington_870[0]')";
$query= @mysql_query($sql,$connection) or die(mysql_error());  

}
?>
